class ArchievesAbilityEntity {
	int code;
	List<ArchievesAbilityData> data;
	String message;

	ArchievesAbilityEntity({this.code, this.data, this.message});

	ArchievesAbilityEntity.fromJson(Map<String, dynamic> json) {
		code = json['code'];
		if (json['data'] != null) {
			data = new List<ArchievesAbilityData>();
			(json['data'] as List).forEach((v) { data.add(new ArchievesAbilityData.fromJson(v)); });
			print('ArchievesAbilityEntity 1 $data lenth ${data.length} - ${data[0].skillPropertiesList[0].skillProperties} ' );
		}
		message = json['message'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['code'] = this.code;
		if (this.data != null) {
      data['data'] =  this.data.map((v) => v.toJson()).toList();
    }
		data['message'] = this.message;
		return data;
	}
}

class ArchievesAbilityData {
	List<ArchievesAbilityDataSkillpropertieslist> skillPropertiesList;
	String skillType;
	List<String> goodAtProperty;

	ArchievesAbilityData({this.skillPropertiesList, this.skillType, this.goodAtProperty});

	ArchievesAbilityData.fromJson(Map<String, dynamic> json) {
		if (json['skillPropertiesList'] != null) {
			skillPropertiesList = new List<ArchievesAbilityDataSkillpropertieslist>();(json['skillPropertiesList'] as List).forEach((v) { skillPropertiesList.add(new ArchievesAbilityDataSkillpropertieslist.fromJson(v)); });
		}
		skillType = json['skillType'];
		goodAtProperty = json['goodAtProperty']?.cast<String>();
//		print('ArchievesAbilityEntity 2 $skillPropertiesList' );
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.skillPropertiesList != null) {
      data['skillPropertiesList'] =  this.skillPropertiesList.map((v) => v.toJson()).toList();
    }
		data['skillType'] = this.skillType;
		data['goodAtProperty'] = this.goodAtProperty;
		return data;
	}
}

class ArchievesAbilityDataSkillpropertieslist {
	String subType;
	Map<String, ArchievesAbilityDataSkillpropertieslistSkillproperty> skillProperties;

	ArchievesAbilityDataSkillpropertieslist({this.subType, this.skillProperties});

	ArchievesAbilityDataSkillpropertieslist.fromJson(Map<String, dynamic> json) {
		subType = json['subType'];
//		print('skillProperties json $json');
		if (json['skillProperties'] != null) {
//			skillProperties = new List<ArchievesAbilityDataSkillpropertieslistSkillproperty>();
// (json['skillProperties'] as List).forEach((v) { skillProperties.add(new ArchievesAbilityDataSkillpropertieslistSkillproperty.fromJson(v)); });
			skillProperties = new Map<String, ArchievesAbilityDataSkillpropertieslistSkillproperty>();
				(json['skillProperties'] as Map).forEach((k,v) {
//					print('skillProperties $skillProperties');
        skillProperties[k] = ArchievesAbilityDataSkillpropertieslistSkillproperty.fromJson(v);
			});
		}
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
    final Map<String, dynamic> skills = new Map<String, dynamic>();
		data['subType'] = this.subType;
		if (this.skillProperties != null) {
		  this.skillProperties.forEach((String key, ArchievesAbilityDataSkillpropertieslistSkillproperty value) {
        skills[key] = value;
      });
      data['skillProperties'] =  skills;
//      map((v) => v.toJson()).toList();
    }
		return data;
	}
}

class ArchievesAbilityDataSkillpropertieslistSkillproperty {
	int weightPercent;
	String skillType;
	String achieve;
	String idol;
	String type;
	String title;
	int percent;
	int min;
	String illPropertyId;
	int bodyMin;
	String iconUrl;
	String propertyId;
	int value;
	String weightPropose;
	dynamic illness;
	int criticalValue;
	int level;
	int max;
	int bodyMax;
	String weightType;
	int weightGrade;
	dynamic effect;
	String name;
	String criticalDesc;
	String studyId;
	String desc;

	ArchievesAbilityDataSkillpropertieslistSkillproperty({this.weightPercent, this.skillType, this.achieve, this.idol, this.type, this.title, this.percent, this.min, this.illPropertyId, this.bodyMin, this.iconUrl, this.propertyId, this.value, this.weightPropose, this.illness, this.criticalValue, this.level, this.max, this.bodyMax, this.weightType, this.weightGrade, this.effect, this.name, this.criticalDesc, this.studyId, this.desc});

	ArchievesAbilityDataSkillpropertieslistSkillproperty.fromJson(Map<String, dynamic> json) {
//		print('skillPropertiesList data ${json['idol']} ${json['name']}');
		weightPercent = json['weightPercent'];
		skillType = json['skillType'];
		achieve = json['achieve'];
		idol = json['idol'];
		type = json['type'];
		title = json['title'];
		percent = json['percent'];
		min = json['min'];
		illPropertyId = json['illPropertyId'];
		bodyMin = json['bodyMin'];
		iconUrl = json['iconUrl'];
		propertyId = json['propertyId'];
		value = json['value'];
		weightPropose = json['weightPropose'];
		illness = json['illness'];
		criticalValue = json['criticalValue'];
		level = json['level'];
		max = json['max'];
		bodyMax = json['bodyMax'];
		weightType = json['weightType'];
		weightGrade = json['weightGrade'];
		effect = json['effect'];
		name = json['name'];
		criticalDesc = json['criticalDesc'];
		studyId = json['studyId'];
		desc = json['desc'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['weightPercent'] = this.weightPercent;
		data['skillType'] = this.skillType;
		data['achieve'] = this.achieve;
		data['idol'] = this.idol;
		data['type'] = this.type;
		data['title'] = this.title;
		data['percent'] = this.percent;
		data['min'] = this.min;
		data['illPropertyId'] = this.illPropertyId;
		data['bodyMin'] = this.bodyMin;
		data['iconUrl'] = this.iconUrl;
		data['propertyId'] = this.propertyId;
		data['value'] = this.value;
		data['weightPropose'] = this.weightPropose;
		data['illness'] = this.illness;
		data['criticalValue'] = this.criticalValue;
		data['level'] = this.level;
		data['max'] = this.max;
		data['bodyMax'] = this.bodyMax;
		data['weightType'] = this.weightType;
		data['weightGrade'] = this.weightGrade;
		data['effect'] = this.effect;
		data['name'] = this.name;
		data['criticalDesc'] = this.criticalDesc;
		data['studyId'] = this.studyId;
		data['desc'] = this.desc;
		return data;
	}
}
